import request from '@/utils/request'
// 注册
export const userRegister = ({ username, password}) =>
  request({
    method: 'post',
    url: '/auth/register',
    data: { username, password }
  })
// 登录
export const userLogin = ({ username, password }) =>
  request({
    method: 'post',
    url: '/auth/login',
    data: { username, password }
  })
// 手机号登录
export const userPhoneLogin = ({ phone, code }) =>
  request({
    method: 'post',
    url: '/auth/phoneLogin',
    data: { phone, code }
  })
//发送验证码
export const sendCode = ({ phone }) =>
  request({
    method: 'post',
    url: '/auth/sendCode',
    data: { phone }
  })
